// Decompiled by GOOSIN CO,LTD Copyright 2010 Pavel Kouznetsov.
// home page: http://www.Goosin.net
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   ValidatorDupBean6.java

package include.validator;

import include.nseer_db.nseer_db;
import java.sql.ResultSet;
import javax.servlet.http.HttpSession;

public class ValidatorDupBean6
{

	private boolean a;

	public ValidatorDupBean6()
	{
	}

	public boolean isDup(HttpSession session, String tn, String fn, String value, String values)
	{
		try
		{
			nseer_db db = new nseer_db((String)session.getAttribute("unit_db_name"));
			String sql = (new StringBuilder("select * from ")).append(tn).append(" where ").append(fn).append("='").append(value).append("' and kind='").append(values).append("' ").toString();
			ResultSet rs = db.executeQuery(sql);
			if (rs.next())
				a = true;
			else
				a = false;
			db.close();
		}
		catch (Exception ex)
		{
			ex.printStackTrace();
		}
		return a;
	}
}
